import { useState } from "react"

const StaticList = () => {
  const [list] = useState([
    { label: '组件状态 - useState' },
    { label: '组件传值 - prop' },
    { label: '获取dom - useRef' },
    { label: '获取子组件dom - forwardRef' },
    { label: '列表渲染 - map' },
    { label: '条件渲染 - ?:-&&' },
    { label: '缓存计算结果 - useMemo' },
    { label: '缓存函数 - useCallback' },
    { label: '监听器 - useEffect' },
    { label: '表单输入 - onChange' },
  ])
  return (
    <>
      <h3>--列表渲染</h3>
      <ul>
        {
          list.map((item, i) => <li key={i}>{item.label}</li>)
        }
      </ul>
    </>
  )
}

export default StaticList
